
#include <cv.h>
#include <highgui.h>
#include <iostream>
#include <opencv2/gpu/gpu.hpp>
using namespace cv;
using namespace std;

Mat rotate(Mat src, double angle)
{
    Mat dst;
    Point2f pt(src.cols/2, src.rows/2);
    Mat r = getRotationMatrix2D(pt, angle, 1.0);
    warpAffine(src, dst, r, Size(src.cols, src.rows),INTER_CUBIC);
    return dst;
}
int main( int argc, char** argv )
{

 Mat src, dst;
 src = imread("/home/erman/cuda-workspace/MutualInformation/src/imageRGB.bmp", CV_LOAD_IMAGE_COLOR);

  if(!src.data )
    {
      printf( "No image data \n" );
      return -1;
    }


  dst = rotate(src, 20);

  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", dst );


  waitKey(50000000);

  return 0;
}

